$(function () {
    let url = './img/jd_head.gif'
    let i = 0
    $(".ces").on('mouseover', function () {

        let timeStr = new Date().getTime()
        let imgUrl = "url(" + url + "?time=" + timeStr + ")"
        // console.log(imgUrl);
        $(".ces").css('background-image', imgUrl)

        $(".ces").removeClass("jd_logo").addClass("jd_head_img")
        setTimeout(function () {
            i = 1;
        }, 3000)

    })

    $(".ces").on('mouseleave', function () {
        if (i == 1) {
            // console.log('y');
            $(".ces").css('background', 'url(./img/JD_logo.png)')
            $(".ces").removeClass("jd_head_img").addClass("jd_logo")
            i = 0
        } else {
            // console.log('x');
            setTimeout(function () {
                $(".ces").css('background', 'url(./img/JD_logo.png)')
                $(".ces").removeClass("jd_head_img").addClass("jd_logo")
                i = 0
            }, 3000)
        }


    })
})